/**
 * Project Name:wxmarket
 * File Name:UserController.java
 * Package Name:com.ruiyin.service
 * Date:2016-5-25下午01:59:00
 * Copyright (c) 2016, 江苏瑞银科技有限公司 All Rights Reserved.
 *
*/

package com.ruiyin.service;

import java.util.List;

import org.apache.commons.httpclient.methods.GetMethod;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Page;
import com.ruiyin.bean.Microchannelinformation;
import com.ruiyin.bean.Microchannelstate;
import com.ruiyin.bean.SysUser;
import com.ruiyin.bean.Weixinparameters;

/**
 * ClassName:WeixinService <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason:	 TODO ADD REASON. <br/>
 * Date:     2016-5-25 下午01:59:00 <br/>
 * @version  
 * @see 	 
 */
public class MicrochannelstateService {
	
	//根据id查询微信公众号的信息
	public List<Microchannelstate> paginate() {
		return  (List<Microchannelstate>) Microchannelstate.dao.find("select * from Microchannelstate");
		
	}
	
	public void delete(String openid) {
		Microchannelstate microchannelstate =new Microchannelstate();
		microchannelstate.setOpenid(openid);
		microchannelstate.delete();
		//Db.update("delete from Microchannelstate where openid=?",openid);
		
	}
	
	//根据id查询微信公众号的信息
	public List<Microchannelstate> paginates(String openid) {
		return  (List<Microchannelstate>) Microchannelstate.dao.find("select * from Microchannelstate where openid=?",openid);
		
	}
	
	//删除
	public void deleteAll() {
		Db.update("delete from Microchannelstate");
		
	}

	//查询所有关注用户信息
	public List<Microchannelinformation> allAttentionUsers() {
		return  (List<Microchannelinformation>) Microchannelinformation.dao.find("select * from Microchannelinformation");
	}
	
}

